package cn.edu.cdut.dao;

import cn.edu.cdut.model.WishInfo;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

/**
 * Author  kobe
 * Created on 2017-05-27-22:43
 */
public interface WishInfoDao extends CrudRepository<WishInfo, Long> {
        //List<WishInfo> findAll();
        WishInfo findByStuId(String stuId);
        List<WishInfo> findByGrade(String grade);
        List<WishInfo> findByGradeAndWish1AndIsEnrolledOrderByScoreDesc(String grade, String wish1, boolean isEnrolled);
        List<WishInfo> findByGradeAndWish2AndIsEnrolledOrderByScoreDesc(String grade, String wish1, boolean isEnrolled);
        List<WishInfo> findByGradeAndWish3AndIsEnrolledOrderByScoreDesc(String grade, String wish1, boolean isEnrolled);
        List<WishInfo> findByGradeAndWish4AndIsEnrolledOrderByScoreDesc(String grade, String wish1, boolean isEnrolled);
        List<WishInfo> findByGradeAndWish5AndIsEnrolledOrderByScoreDesc(String grade, String wish1, boolean isEnrolled);
}
